/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.railway.app;

import com.railway.classes.Ticket;
import com.railway.utils.RestServer;
import com.railway.utils.Toast;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.io.UnsupportedEncodingException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import javax.swing.ImageIcon;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.JRadioButton;


/**
 *
 * @author Jason
 */
public class TicketPurchasePanel extends javax.swing.JPanel {

    Image imgArrow = new ImageIcon(this.getClass().getResource("/com/railway/image/arrow.png")).getImage();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");  
    ButtonGroup bgSchedule = new ButtonGroup();
    String[][] myStringArray = new String [0][1];
    private int totalRadioButtonGenerated = 0;
    JRadioButton jRadioButton[] = new JRadioButton[0];
    private String originStationId=null;
    private String destinStationId=null;
    private boolean checked = false;
    SimpleDateFormat sdfHours = new SimpleDateFormat("HH:mm:ss");
    /**
     * Creates new form RoutePanel
     */
    public TicketPurchasePanel() {
        initComponents();
        populateRouteJComboBox();
        jpTicketSchedule.setVisible(false);
    }
    
    
    private void populateRouteJComboBox(){
        String a = RestServer.httpGet("routePopulate","null");
        jcbRoute.addItem("Please select a route");

        try {
            JSONObject json = new JSONObject(a);
            JSONArray content = json.getJSONArray("content");
            int length = content.length();
            for(int i = 0 ; i < length ; i ++){
                jcbRoute.addItem(content.getJSONObject(i).getString("routeName"));
            }
        } catch (JSONException ex) {
            Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
        }
    }
    
    private void initializeTicketPrice(){
        String rid = ""+jcbRoute.getSelectedIndex();
        String a = RestServer.httpGet("getScheduleOriginPrice", rid+"/"+originStationId);
        String b = RestServer.httpGet("getScheduleDestinationPrice", rid+"/"+destinStationId);
        
        double originFare = 0;
        double destinationFare = 0;
        double price = 0;
        try{
            JSONObject jsonOrigin= new JSONObject(a);
            JSONArray contentOrigin = jsonOrigin.getJSONArray("content");
            JSONObject jsonDest = new JSONObject(b);
            JSONArray contentDest = jsonDest.getJSONArray("content");
            
            originFare = contentOrigin.getJSONObject(0).getDouble("fare");
            destinationFare = contentDest.getJSONObject(0).getDouble("fare");
            
            if(originFare ==0){
                price = destinationFare - originFare;
            }else{
                price = (destinationFare - originFare) + 8;
            }
            Ticket.setTicketPrice(price);
            System.out.println("------------------");
            System.out.println("Ticket Price -> RM "+price);
        }catch(JSONException ex){
            System.out.println(ex);
        }
    }
    


    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        label1 = new java.awt.Label();
        jpStaffArrow = new javax.swing.JPanel(){
            protected void paintComponent(Graphics g){
                super.paintComponent(g);
                g.drawImage(imgArrow, 0, 0, getWidth(), getHeight(), this);
            }
        };
        jpStaff = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jcbOrigin = new javax.swing.JComboBox();
        jcbDestination = new javax.swing.JComboBox();
        jCalendar = new com.toedter.calendar.JDateChooser();
        jcbRoute = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jspTicketSchedule = new javax.swing.JScrollPane();
        jpTicketSchedule = new javax.swing.JPanel();
        jbtProceed = new javax.swing.JButton();

        label1.setText("label1");

        setPreferredSize(new java.awt.Dimension(870, 460));
        setLayout(null);

        javax.swing.GroupLayout jpStaffArrowLayout = new javax.swing.GroupLayout(jpStaffArrow);
        jpStaffArrow.setLayout(jpStaffArrowLayout);
        jpStaffArrowLayout.setHorizontalGroup(
            jpStaffArrowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 150, Short.MAX_VALUE)
        );
        jpStaffArrowLayout.setVerticalGroup(
            jpStaffArrowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        add(jpStaffArrow);
        jpStaffArrow.setBounds(0, 0, 150, 20);

        jpStaff.setBackground(new java.awt.Color(220, 220, 220));
        jpStaff.setAutoscrolls(true);
        jpStaff.setLayout(null);

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Purchase Ticket"));

        jLabel1.setText("Route");

        jLabel2.setText("Origin");

        jLabel3.setText("Destination");

        jLabel4.setText("Date of Journey");

        jcbOrigin.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbOriginActionPerformed(evt);
            }
        });

        jcbRoute.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jcbRouteItemStateChanged(evt);
            }
        });
        jcbRoute.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbRouteActionPerformed(evt);
            }
        });

        jButton1.setText("Check");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jspTicketSchedule.setBorder(javax.swing.BorderFactory.createTitledBorder("Route Name     Schedule Name                   Departure                    Date                          Origin                          Destination  "));

        jpTicketSchedule.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        jpTicketSchedule.setAutoscrolls(true);

        javax.swing.GroupLayout jpTicketScheduleLayout = new javax.swing.GroupLayout(jpTicketSchedule);
        jpTicketSchedule.setLayout(jpTicketScheduleLayout);
        jpTicketScheduleLayout.setHorizontalGroup(
            jpTicketScheduleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 824, Short.MAX_VALUE)
        );
        jpTicketScheduleLayout.setVerticalGroup(
            jpTicketScheduleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 224, Short.MAX_VALUE)
        );

        jspTicketSchedule.setViewportView(jpTicketSchedule);

        jbtProceed.setText("Proceed");
        jbtProceed.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtProceedActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jspTicketSchedule, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 838, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE)
                    .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jcbOrigin, 0, 215, Short.MAX_VALUE)
                    .addComponent(jcbRoute, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(89, 89, 89)
                        .addComponent(jcbDestination, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(10, 10, 10))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbtProceed, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 140, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(jcbRoute, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jcbOrigin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(jcbDestination, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel4)
                            .addComponent(jCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jspTicketSchedule, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jbtProceed, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jCalendar.setDateFormatString("yyyy-MM-dd");

        jCalendar.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jCalendar.setMaxSelectableDate(new java.util.Date(253370739664000L));

        jCalendar.setMinSelectableDate(new Date());

        jCalendar.setBounds(120, 120, 250, 30);

        jpStaff.add(jPanel1);
        jPanel1.setBounds(10, 10, 850, 420);

        add(jpStaff);
        jpStaff.setBounds(0, 20, 870, 440);
        jpStaff.getAccessibleContext().setAccessibleName("ticketForm");
    }// </editor-fold>//GEN-END:initComponents

    private void jcbRouteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbRouteActionPerformed
            String index;
            if(jcbRoute.getSelectedIndex()!=0){
            jcbOrigin.removeAllItems();
            jcbOrigin.addItem("Please select a origin");
            index =  ""+jcbRoute.getSelectedIndex();
            String a = RestServer.httpGet("originPopulate",index);

            try {
                JSONObject json = new JSONObject(a);
                JSONArray content =  json.getJSONArray("content");
                int length = content.length()-1;
                for(int i = 0 ; i < length ; i ++){
                    jcbOrigin.addItem(""+content.getJSONObject(i).getString("stationName"));
                }
                
            } catch (JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            } catch (NullPointerException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }
        }
    }//GEN-LAST:event_jcbRouteActionPerformed

    
    
    private void jcbOriginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbOriginActionPerformed
        String sid;
        String originName;
        if(jcbRoute.getSelectedIndex()!=0 && jcbOrigin.getSelectedIndex()!=0 &&jcbOrigin.getItemCount()!=0){

            originName = jcbOrigin.getSelectedItem().toString();
            
            jcbDestination.removeAllItems();
            jcbDestination.addItem("Please select a destination");
            String news;
            try{
            news = java.net.URLEncoder.encode(originName, "UTF-8").replace("+", "%20");
            String a = RestServer.httpGet("getStationIdByStationName",news);
            JSONObject jsons = new JSONObject(a);
            JSONObject contents = jsons.getJSONObject("content");
            sid = contents.getString("sid");
                        
            String rid = ""+jcbRoute.getSelectedIndex();
            String srid = rid + "/" + sid;
            String b = RestServer.httpGet("destPopulate",srid);

                JSONObject json = new JSONObject(b);
                JSONArray content = json.getJSONArray("content");
                int length = content.length();

                for(int i = 0 ; i < length ; i ++){
                    jcbDestination.addItem(""+content.getJSONObject(i).getString("stationName"));
                }
            
            } catch (JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(UnsupportedEncodingException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(NullPointerException ex){
                
            }
        }
    }//GEN-LAST:event_jcbOriginActionPerformed

    private void jcbRouteItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jcbRouteItemStateChanged

    }//GEN-LAST:event_jcbRouteItemStateChanged

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        checked = true;
        String originName;
        String originEncoder;
        
        
        String destinName;
        String destinEncoder;
        
        if(jcbRoute.getSelectedIndex()!=0 && jcbOrigin.getSelectedIndex()!=0 && jcbDestination.getSelectedIndex()!=0 && jCalendar.getDate()!=null){
           originName = jcbOrigin.getSelectedItem().toString();
            try{
            originEncoder = java.net.URLEncoder.encode(originName, "UTF-8").replace("+", "%20");
            String a = RestServer.httpGet("getStationIdByStationName",originEncoder.trim());
            JSONObject jsons = new JSONObject(a);
            JSONObject contents = jsons.getJSONObject("content");
            originStationId = contents.getString("sid");
            Toast.makeText(getParent(), "Loading schedule . . .", Toast.LENGTH_SHORT).display();
            }catch(JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(UnsupportedEncodingException ex){
                Toast.makeText(getParent(), ""+ex,  Toast.LENGTH_LONG).display();
            }catch(NullPointerException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }
            
            
            destinName = jcbDestination.getSelectedItem().toString();
            try{
            destinEncoder = java.net.URLEncoder.encode(destinName, "UTF-8").replace("+", "%20");
            String b = RestServer.httpGet("getDestinationStationIdByStationName",destinEncoder.trim());
            JSONObject jsons = new JSONObject(b);
            JSONObject contents = jsons.getJSONObject("content");
            destinStationId = contents.getString("sid");
            }catch(JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(UnsupportedEncodingException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(NullPointerException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }
            
            Map<String, Object> data = new HashMap<>();
            data.put("routeid", jcbRoute.getSelectedIndex());
            data.put("originid", originStationId);
            data.put("destinid", destinStationId);
            data.put("selectedDate", sdf.format(jCalendar.getDate()));

            String c = RestServer.httpPost("obtainSchedule",data);
            
            try {
                JSONObject json = new JSONObject(c);
                JSONObject content = json.getJSONObject("content");
                JSONArray origin = content.getJSONArray("infoOrigin");
                JSONArray destin = content.getJSONArray("infoDestin");
                
                jpTicketSchedule.removeAll();
                int length = origin.length();
                GridLayout layout = new GridLayout(length,1);
                layout.setHgap(1);
                layout.setVgap(1);
                jpTicketSchedule.setLayout(layout);
                jRadioButton = new JRadioButton[length];
                String selectedDate = sdf.format(jCalendar.getDate()).toString();
                myStringArray = new String [length][2];
                for(int i = 0 ; i < length ; i++){

                
                        myStringArray[i][0] = "A "+origin.getJSONObject(i).getString("routeName");
                        myStringArray[i][1] = "B "+origin.getJSONObject(i).getString("scheduleName");
                        jRadioButton[i] = new javax.swing.JRadioButton(""+origin.getJSONObject(i).getString("routeName")+  "             "+origin.getJSONObject(i).getString("scheduleName")+ "            "
                                                + "                    "+origin.getJSONObject(i).getString("departureTime")+ "                  " +selectedDate+"              " 
                                                + origin.getJSONObject(i).getString("stationName")+     "             "
                                                + "          "+destin.getJSONObject(i).getString("stationName")); 

                        jpTicketSchedule.add(jRadioButton[i]);
                        bgSchedule.add(jRadioButton[i]);
                        totalRadioButtonGenerated++;
                    
                }
                //jRadioButton[0].setSelected(true);
                
                
                jpTicketSchedule.setVisible(true);
                jpTicketSchedule.revalidate();
                jpTicketSchedule.repaint();
                
                

            } catch (JSONException ex) {
                Toast.makeText(getParent(), "No schedule found!", Toast.LENGTH_LONG).display();
            }
                    
        }else{
            Toast.makeText(getParent(), "Please select option !", Toast.LENGTH_LONG).display();
            jpTicketSchedule.setVisible(false);
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jbtProceedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtProceedActionPerformed
        if(!checked){
            Toast.makeText(getParent(), "Please select schedule", Toast.LENGTH_LONG).display();
        }else{
            initializeTicketPrice();
            String text = getSelectedButtonText(bgSchedule);
            int j = 0;
            String[] listed = text.split("  ");


            String[] details = new String[1000];
            for(int i = 0 ; i < listed.length ; i++){
                if(!listed[i].equals("")){
                    details[j] = listed[i];
                    j++;
                }
            }



            String a = RestServer.httpGet("scheduleIdByName", details[1].toString().trim());
            String scheduleID = null;
            try{
                JSONObject json = new JSONObject(a);
                JSONArray content = json.getJSONArray("content");
                scheduleID = content.getJSONObject(0).getString("shid");

                Ticket.setShid(scheduleID);
                Ticket.setClasses(details[1]);
                Ticket.setDepatureTime(details[2]);
                Ticket.setBookedDate(details[3]);
                Ticket.setOrigin(details[4]);
                Ticket.setDestination(details[5]);

                System.out.println("Ticket Details");
                System.out.println("Ticket Class:"+ Ticket.getClasses());
                System.out.println("Ticket Date: "+Ticket.getBookedDate());
                System.out.println("Ticket Origin: "+Ticket.getOrigin());
                System.out.println("Ticket Destination: "+Ticket.getDestination());
                System.out.println("Ticket Time: "+Ticket.getDepatureTime());
                SeatDialog seat = new SeatDialog(null, true);
                seat.setVisible(true); 
            }catch(JSONException ex){
                System.out.println(ex);
            }
        }
    }//GEN-LAST:event_jbtProceedActionPerformed

    public String getSelectedButtonText(ButtonGroup buttonGroup) {
        for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements();) {
            AbstractButton button = buttons.nextElement();
            if (button.isSelected()) {
                return button.getText();
            }
        }
        return null;
    }

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private com.toedter.calendar.JDateChooser jCalendar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JButton jbtProceed;
    private javax.swing.JComboBox jcbDestination;
    private javax.swing.JComboBox jcbOrigin;
    private javax.swing.JComboBox jcbRoute;
    private javax.swing.JPanel jpStaff;
    private javax.swing.JPanel jpStaffArrow;
    private javax.swing.JPanel jpTicketSchedule;
    private javax.swing.JScrollPane jspTicketSchedule;
    private java.awt.Label label1;
    // End of variables declaration//GEN-END:variables
}
